syw_name = "宋亚微"
syw_id = "1"
syw_role = "项目经理"
lyt_name = "李艺彤"
lyt_id = "2"
lyt_role = "输入开发员"
txr_name = "田欣如"
txr_id = "3"
txr_role = "测试员"
cy_name = "曹钰"
cy_id = "4"
cy_role = "菜单开发员"
smy_name = "石梦怡"
smy_id = "5"
smy_role = "权限开发员"
dt_name = "窦甜"
dt_id = "6"
dt_role = "文档员"
xiaozu_id = "02"

def A():

    syw_name = input("请输入成员1姓名：")
    syw_id = input("请输入成员1学号：")
    syw_roLe = input("请输入成员1角色：")
    lyt_name = input("请输入成员2姓名：")
    lyt_id = input("请输入成员2学号：")
    lyt_roLe = input("请输入成员2角色：")
    txr_name = input("请输入成员3姓名：")
    txr_id = input("请输入成员3学号：")
    txr_roLe = input("请输入成员3角色：")
    cy_name = input("请输入成员4姓名：")
    cy_id = input("请输入成员4学号：")
    cy_roLe = input("请输入成员4角色：")
    smy_name = input("请输入成员5姓名：")
    smy_id = input("请输入成员5学号：")
    smy_roLe = input("请输入成员5角色：")
    dt_name = input("请输入成员6姓名：")
    dt_id = input("请输入成员6学号：")
    dt_roLe = input("请输入成员6角色：")
    print(f"{xiaozu_id}：学生信息已更新！")
    print(f"{xiaozu_id}：更新后的成员信息如下：")
    print(f"姓名：{syw_name},学号：{syw_id},角色：{syw_roLe}\n姓名：{lyt_name},学号：{lyt_id},角色：{lyt_roLe}\n姓名：{txr_name},学号：{txr_id},角色：{txr_roLe}\n姓名：{cy_name},学号：{cy_id},角色：{cy_roLe}\n姓名：{smy_name},学号：{smy_id},角色：{smy_roLe}\n姓名：{dt_name},学号：{dt_id},角色：{dt_roLe}")

def B():
    name1 = input("请输入要查询的姓名：")
    if name1 != "宋亚微" and name != "李艺彤" and name != "田欣如" and name != "曹钰"and name != "石梦怡" and name != "窦甜":
        print(f"{xiaozu_id}： {name1} 无有效权限！")
    elif name1 == "宋亚微":
        print(f"{xiaozu_id}: {name1} 有权限删除数据！")
    elif name1 == "李艺彤":
        print(f"{xiaozu_id}: {name1} 有权限开发数据！")
    elif name1 == "田欣如":
        print(f"{xiaozu_id}: {name1} 有权限测试数据！")
    elif name1 == "曹钰":
        print(f"{xiaozu_id}: {name1} 有权限设计菜单！")
    elif name1 == "石梦怡":
        print(f"{xiaozu_id}: {name1} 有权限删除数据！")
    elif name1 == "窦甜":
        print(f"{xiaozu_id}: {name1} 有权限开发数据！")

def C():
    print(f"{xiaozu_id}：成员信息如下：")
    print(f"姓名：{syw_name},学号：{syw_id},角色：{syw_role}\n姓名：{lyt_name},学号：{lyt_id},角色：{lyt_role}\n姓名：{txr_name},学号：{txr_id},角色：{txr_role}\n姓名：{cy_name},学号：{cy_id},角色：{cy_role}\n姓名：{smy_name},学号：{smy_id},角色：{smy_role}\n姓名：{dt_name},学号：{dt_id},角色：{dt_role}")

def D():
    name2 = input("请输入操作者姓名：")
    id2 = input("请输入操作者学号：")
    role2 = input("请输入操作者角色：")
    if role2 == "项目经理":
        name3 = input("请输入要删除的姓名:")
        global syw_name,syw_id,syw_roLe,lyt_name,lyt_id,lyt_roLe,txr_name,txr_id,txr_roLe,cy_name,cy_id,cy_roLe,smy_name,smy_id,smy_roLe,dt_name,dt_id,dt_roLe
        if name3 == syw_name:
            syw_name = ""
            syw_id = ""
            syw_roLe = ""
        elif name3 == lyt_name:
            lyt_name = ""
            lyt_id = ""
            lyt_roLe = ""
        elif name3 == txr_name:
            txr_name = ""
            txr_id = ""
            txr_roLe = ""
        elif name3 == cy_name:
            cy_name = ""
            cy_id = ""
            cy_roLe = ""
        elif name3 == smy_name:
            smy_name = ""
            smy_id = ""
            smy_roLe = ""
        elif name3 == dt_name:
            dt_name = ""
            dt_id = ""
            dt_roLe = ""
        print(f"{xiaozu_id}: {name3} 的信息已删除！")

    else:
        print(f"{xiaozu_id}: 无权限删除其他成员信息！")

def E():
    exit(f"{xiaozu_id}: 程序已退出！")

while True:
    name = input(f"请输入正在操作的{xiaozu_id}的成员姓名：")
    if name != "宋亚微" and name != "李艺彤" and name != "田欣如" and name != "曹钰"and name != "石梦怡" and name != "窦甜":
        print(f"错误： {name} 不是{xiaozu_id}的成员!")
    else:
        i = int(input(f"请输入{xiaozu_id}的操作:（1_{xiaozu_id}_更新学生信息,2_{xiaozu_id}_查询学生信息,3_{xiaozu_id}_展示学生信息,4_{xiaozu_id}_删除学生信息,5_{xiaozu_id}_退出程序）："))
        match i:
            case 1:
                A()
            case 2:
                B()
            case 3:
                C()
            case 4:
                D()
            case 5:
                E()